package com.itheima.stock.mapper;

import com.itheima.stock.pojo.domain.*;
import com.itheima.stock.pojo.entity.StockRtInfo;
import org.apache.ibatis.annotations.MapKey;
import org.apache.ibatis.annotations.Param;
import org.joda.time.DateTime;

import java.math.BigDecimal;
import java.time.LocalDate;
import java.time.LocalDateTime;
import java.util.*;

/**
* @author hyx
* @description 针对表【stock_rt_info(个股详情信息表)】的数据库操作Mapper
* @createDate 2024-05-22 20:50:24
* @Entity com.itheima.stock.pojo.entity.StockRtInfo
*/
public interface StockRtInfoMapper {

    int deleteByPrimaryKey(Long id);

    int insert(StockRtInfo record);

    int insertSelective(StockRtInfo record);

    StockRtInfo selectByPrimaryKey(Long id);

    int updateByPrimaryKeySelective(StockRtInfo record);

    int updateByPrimaryKey(StockRtInfo record);

    List<RtDomain> RtPage();

    List<RtDomain> RtAll();

    ArrayList<Map> UpDownCount(@Param("openTime") Date openTime, @Param("curTime") Date curTime, @Param("flag") int flag);

    List<Map<String, Object>> getStockUpDown(@Param("pointTime") Date pointTime);

    List<Stock4MinuteDomain> stockScreenTimeSharing(@Param("openTime") Date openTime, @Param("curTime") Date curTime, @Param("code") String code);

//    List<Stock4EvrDayDomain> getDayKLinData(@Param("openTime") Date openTime, @Param("closeTime") Date closeTime, @Param("code") String code);


    void insertBatch(@Param("infos") List infos);

//    List<WeekklineDomain> getWeekkline(@Param("openTime") Date openTime, @Param("closeTime") Date closeTime, @Param("code") String code);

    DetailDomain getRtDetail(@Param("pointTime") Date pointTime, @Param("code") String code);

    List<TradeDomain> getRtTrade(@Param("startTime") Date startTime,@Param("curTime") Date curTime, @Param("code") String code);

    List<WeekklineBeforeDomain> getWeekklineBefore(@Param("startTime") Date startTime, @Param("endTime") Date endTime, @Param("code") String code);

    List<BigDecimal> getOpenPrice(@Param("miTimes") List<Date> miTimes, @Param("code") String code);

    List<BigDecimal> getClosePrice(@Param("mxTimes") List<Date> mxTimes, @Param("code") String code);

    List<LocalDateTime> getDayMaxCurTime(@Param("openTime") Date openTime, @Param("closeTime") Date closeTime, @Param("code") String code);

    List<Stock4EvrDayDomain> getDayKLinDataByTime(@Param("mxTimes") List<Date> mxTimes,@Param("code") String code);
}
